{extend name="layout/common_layout" /}
{block name="body"}
<!--tab标签-->
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class=""><a href="{:url('admin/floor/index')}">分类管理</a></li>
        <li class="layui-this">添加分类</li>
    </ul>
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <form class="layui-form form-container" action="{:url('admin/floor/save')}" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">上级分类</label>
                    <div class="layui-input-block">
                        <select name="pid" lay-verify="required">
                            <option value="0">一级分类</option>
                            {foreach name="category_level_list" item="vo"}
                            <option value="{$vo.id}" {if condition="$pid==$vo.id"} selected="selected"{/if}>{neq name="vo.level" value="1"}|{php}for($i=1;$i<$vo['level'];$i++){echo ' ----';}{/php}{/neq} {$vo.name}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">纸质名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" value="" required  lay-verify="required" placeholder="请输入纸质名称" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">吨价</label>
                    <div class="layui-input-block">
                        <input type="text" name="price" value="" required  lay-verify="required" placeholder="请输入吨价" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">大度系数</label>
                    <div class="layui-input-block">
                        <input type="text" name="largecoefficient" value="" required  lay-verify="required" placeholder="请输入大度系数" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">正度系数</label>
                    <div class="layui-input-block">
                        <input type="text" name="positivecoefficient" value="" required  lay-verify="required" placeholder="请输入正度系数" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script src="__JS__/kindeditor/kindeditor.config.js"></script>
<script src="__JS__/kindeditor/kindeditor-all-min.js"></script>
{/block}
{block name="script"}
<script>
    KindEditor.ready(function(K) {
        K.create('#content', KindEditorOptions);
    });
</script>
{/block}